<?php
namespace ChannelThrift\Service;

use Base\BaseService;

class CarSourceService extends BaseService {
    Protected $autoCheckFields = false;
    public  $connection = 'DB_AUMS';
    public $tablePrefix = 'au_';


    /**
     * @return mixed
     */
    public function getInfo($sid)
    {
        $map = [
            'sid' => $sid,
        ];
        return D("ChannelThrift/Aums/CarSource")->where($map)->find();
    }

    /**
     * 更新车源信息
     * @param int $sid
     * @param array $data
     * @return bool
     */
    public function update($sid,$data)
    {
        $map = [
            'sid' => $sid,
        ];
        $data['last_update'] = date("Y-m-d H:i:s");
        return D("ChannelThrift/Aums/CarSource")->where($map)->save($data);
    }


}
